########################################################################
# PLACE LIST CREATIONS HERE #
########################################################################
stage_list = ["moon", "mars", "jupiter"]
########################################################################
# PLACE ALL OTHER CODE BELOW THIS #
########################################################################
t = codesters.Teacher()
try:
tval1 = stage_list
tval2 = len(stage_list)
tval3a = t.find_text('stage_list')[0][1]
tval3 = tval3a.count(',')
except:
tval1 = "DNE"
tval2 = "DNE"
tval3 = "DNE"
t1 = TestObjective()
t1.add_success('moon' in tval1 and 'mars' in tval1 and 'jupiter' in tval1 and 'pluto' in tval1 and 'space' in tval1 and 'city' in tval1 and tval2 == 6, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you delete your list?")
t1.add_failure(tval2 == 3, "Did you add three more values to your list?")
t1.add_failure(tval2 < 6, "Oops! Make sure your list has six values in it, all separated by commas.")
t1.add_failure(tval3 < 5, "Make sure all the values in your list are separated by commas.")
t1.add_failure(tval2 > 6, "Did you add extra values to your list?")
t1.add_failure('moon' not in tval1 or 'mars' not in tval1 or 'jupiter' not in tval1, "Oops! Did you erase the orignal list values?")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)